Skip to content

Add support for negative const values#125

Open
OleRoss wants to merge 3 commits intoCysharp:mainfrom
OleRoss:feat/include-negative-const-values
Open

Add support for negative const values#125
OleRoss wants to merge 3 commits intoCysharp:mainfrom
OleRoss:feat/include-negative-const-values

Conversation

@OleRoss
Copy link

@OleRoss OleRoss commented Feb 15, 2026

I was not able to get negative constants to generate for csharp:

pub const CONST_I32: i32 = -1;

I believe this is related to #52, which added support for unary enum expressions.

This PR adds the necessary logic by handling unary expr as well. Additionally looks for the bottom expression to handle parenthesized expressions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant